import maya.cmds as cmds

all_lambertList = cmds.ls(type="lambert")
for  lambert in all_lambertList:  
	fileName = cmds.defaultNavigation (defaultTraversal=1, destination = lambert + ".color")
	if fileName :
		cmds.setAttr (fileName[0] + ".uvTilingMode" ,0)
		
all_standardSurfaceList = cmds.ls(type="standardSurface")
for  lambert in all_standardSurfaceList:
	fileName = cmds.defaultNavigation (defaultTraversal=1, destination = lambert + ".baseColor")
	print(fileName)
	if fileName :
		if  cmds.objExists( fileName[0] + ".uvTilingMode"):
			cmds.setAttr (fileName[0] + ".uvTilingMode" ,0)
			

all_surfaceShaderList = cmds.ls(type="surfaceShader")
for  lambert in all_surfaceShaderList:
	fileName = cmds.defaultNavigation (defaultTraversal=1, destination = lambert + ".outColor")
	if fileName :
		if  cmds.objExists( fileName[0] + ".uvTilingMode"):
			cmds.setAttr (fileName[0] + ".uvTilingMode" ,0)